package com.landiao.mapper;

import java.math.BigDecimal;

import org.apache.ibatis.annotations.Param;

import com.landiao.entities.RoleCommisionRule;

public interface RoleCommisionRuleMapper extends BaseMapper<RoleCommisionRule,String>{
    int deleteByPrimaryKey(String roleCommisionRuleId);

    int insert(RoleCommisionRule record);

    int insertSelective(RoleCommisionRule record);

    RoleCommisionRule selectByPrimaryKey(String roleCommisionRuleId);

    int updateByPrimaryKeySelective(RoleCommisionRule record);

    int updateByPrimaryKey(RoleCommisionRule record);
    
    /**
     * 获取最大的终止值
     * @param roleId
     * @return
     */
    RoleCommisionRule selectMaxEndVal(String roleId);
    
    /**
     * 获取比例
     */
    RoleCommisionRule selectRatio(@Param("compId")String compId,@Param("amount")BigDecimal amount);
}